package com.zhf.controller;

import com.zhf.domain.Test;
import com.zhf.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: ZhaoHuanfeng
 * @Date: 2020/12/1 22:57
 */
@RestController //@Controller+@ResponseBody
@RequestMapping("/test")
public class TestController {

    @Autowired
    private TestService testService;
    @RequestMapping("/findAllTest")
    public List<Test> findAllTest(){
        List<Test> tests = testService.findAllTest();
        return tests;
    }
}
